package com.hfplm.hsdz.dialog;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Label;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.SwingConstants;

import java.awt.Component;

import com.teamcenter.rac.aif.AbstractAIFDialog;

public class WaitingDialog extends AbstractAIFDialog {
	JPanel panel ;
	JProgressBar progressBar =null;
	Label label = new Label();
	public WaitingDialog(Frame arg0, String title, String message)
	{
		super(arg0, title);
		this.setModal(false);
		label.setText(message);
		panel = new JPanel(new BorderLayout());
		
		progressBar = new JProgressBar(SwingConstants.HORIZONTAL);
		progressBar.setVisible(true);
		progressBar.setIndeterminate(true);
		
		panel.add(BorderLayout.CENTER,label);
		panel.add(BorderLayout.SOUTH,progressBar);


		panel.setPreferredSize(new Dimension(350,60));
		
		this.getContentPane().add(panel);
		
		centerToScreen();

		pack();
		
	}
	public Label getLabel(){
		return label;
	}
}
